TEZ-4685: DagAppMaster is not picking tez-site.xml from classpath in zookeeper mode#458
TEZ-4685: DagAppMaster is not picking tez-site.xml from classpath in zookeeper mode#458Aggarwal-Raghav wants to merge 1 commit intoapache:masterfrom
Conversation
|
💔 -1 overall
This message was automatically generated. |
f2eba56 to
80f79e8
Compare
|
@ayushtkn / @abstractdog , I have updated the patch. Can you provide your feedback on this implementation? |
|
💔 -1 overall
This message was automatically generated. |
| Configuration conf = new Configuration(); | ||
| Configuration conf = | ||
| STANDALONE_ZOOKEEPER.name().equals(System.getenv(TezConstants.TEZ_FRAMEWORK_MODE)) | ||
| ? new TezConfiguration() | ||
| : new Configuration(); |
There was a problem hiding this comment.
This should be kept somehow in FrameworkUtils, like FrameworkUtils.getInitialConfiguration()
because we might want to hide the details of this "hack" from DAGAppMaster.
Why I call it a hack: it's not because the solution is bad, it's because of the current design, which leads to a catch-22:
- we need a Configuration
- for that we need to know the framework mode
- to know the framework mode and get framework client/server classes we need a Configuration object:
getFrameworkService(conf)
so we cannot do anything better than to achieve original Configuration by the value stored in environment...which is fine, but DAGAppMaster's already overwhelmed logic should not contain such a thing
There was a problem hiding this comment.
@abstractdog do you have pointer what is different in STANDALONE_ZOOKEEPER that it doesn't work here but does work in YARN mode?
There was a problem hiding this comment.
hm, that's a good question: I guess here is where we might want to get back to the original motivation: whether a standalone TezAM docker container needs a tez-site.xml on its classpath (and if so, could it read) or if there is another way to configure it... isn't TEZ-4014 or some earlier work already taking care of this? what do you think @Aggarwal-Raghav ?
tez/tez-common/src/main/java/org/apache/tez/common/TezUtilsInternal.java
Lines 100 to 105 in f09ba7f
There was a problem hiding this comment.
I'll get back on this TEZ-4014 analysis in couple of days.
There was a problem hiding this comment.
Thanks, @abstractdog, for pointing out TEZ-4014.It works well, provided we pass TEZ_FRAMEWORK_MODE=STANDALONE_ZOOKEEPER as an environment variable (using the --env-file or -e flag in the docker run command) and ensure tez-site.xml is in the classpath.
Without this environment variable, it defaults back to YARN mode. I might have missed passing the -e flag initially while working on TEZ-4682 stared using with new TezConfiguration() as in current TEZ-4682 PR 551075b and never checked back :-(
There was a problem hiding this comment.
I'll close this JIRA then
Please check screenshots in TEZ-4685